#!/usr/bin/python
# -*- coding: UTF-8 -*-
from kptest.config.enum import HostType

from extension.test_logic.DpuLogic import DpuLogic


class DPU2_FUNCTION_050(DpuLogic):
    """
        Name:
            DPU2_FUNCTION_050
        Label:
            sdr信息显示
        PreCondition:

        TestStep:
           soc系统/远程机可以通过带内/外获取DPU sdr信息
           带外命令：ipmitool -Ianplus -H <soc_bmc_ip> -U <soc_bmc_user>-P <soc_bmc_user_password> sdr list
        ExpectedResult:
            A) soc系统/远程机可以通过带内/外获取DPU sdr信息
        Parameters:

        Author:
            HK1342
        Last Modified:
            2025/05/09
        Remark:

    """

    # 测试执行前配置等准备操作
    def pre_test_case(self):
        super().pre_test_case()

    # 测试步骤
    def procedure(self):
        sdr_info = self.get_dpu_sdr_info()
        self.assertIsNotNone(sdr_info, "DPU sdr信息信息获取失败")

    # 测试结束后恢复环境
    def post_test_case(self):
        pass
